<p><?= $this->Html->link('+Novi korisnik', '/users/create') ?></p>
<table class="entity-table clear">
<thead>
    <tr>
        <th width="10%">Ime i prezime</th>
        <th width="10%">Korisničko ime</th>
        <th width="9%">Tip naloga</th>
        <th width="9%">Poslednja prijava</th>
        <th width="7%"></th>
    </tr>
</thead>
<tbody>
    <? if(! empty($users)): ?>
        <? foreach ($users as $k=>$row): ?>
        <?
            $user = $row['User'];
        ?>
        <tr id="<?= $user['id'] ?>">
            <td><?= $user['name'] ?></td>
            <td><?= $user['username'] ?></td>
            <td><?= $user['role'] ?></td>
            <td><?= date_local($user['lastlogin'], 'd.M Y H:i') ?></td>
            <td class="actions">
                <?= $this->App->action('delete', '/users/delete/' . $user['id']) ?>
            </td>
        </tr>
        <? endforeach; ?>
    <? else: ?>
        <tr class="blank">
            <td colspan="7">Nema rezultata</td>
        </tr>
    <? endif; ?>
</tbody>
</table>

<script type="text/javascript">
$(function(){
    tableRowClick('/users/edit/');
});
</script>